package com.open.rbac.model.dto.sys;

import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import com.open.center.model.dto.BaseDto;
import com.open.rbac.constant.MenuType;


/**
 * 菜单
 *
 * @author Riche's
 * @since 2022/8/18
 */
@Schema(name = "MenuDto", description = "菜单")
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
@NoArgsConstructor
public class MenuDto extends BaseDto {

    @Schema(description = "父菜单Id")
    private String parentId = "0";

    @Schema(description = "菜单名称")
    private String name;

    @Schema(description = "前端路由名称")
    private String routerName;

    @Schema(description = "前端路由路径")
    private String routerPath;

    @Schema(description = "前端路由的组件路径：/views/**/*.vue|.tsx")
    private String routerComponent;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "请求方法: GET/POST/PUT/DELETE/PATCH")
    private String method;

    @Schema(description = "菜单URL")
    private String url;

    @Schema(description = "菜单类型")
    private MenuType type;

    @Schema(description = "菜单排序")
    private Integer sort;

    @Schema(description = "权限标识")
    private String authKey;

    @Schema(description = "是否已启用：0-否，1-是")
    private boolean enable;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "子菜单列表")
    private List<MenuDto> children;

}
